Optimal. Leaf size=278 \[ \frac {5 x}{512 a^8}+\frac {i a}{36 d (a+i a \tan (c+d x))^9}+\frac {i}{32 d (a+i a \tan (c+d x))^8}+\frac {3 i}{112 a d (a+i a \tan (c+d x))^7}+\frac {i}{48 a^2 d (a+i a \tan (c+d x))^6}+\frac {i}{64 a^3 d (a+i a \tan (c+d x))^5}+\frac {7 i}{768 a^5 d (a+i a \tan (c+d x))^3}+\frac {3 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^4}+\frac {i}{128 d \left (a^4+i a^4 \tan (c+d x)\right )^2}-\frac {i}{1024 d \left (a^8-i a^8 \tan (c+d x)\right )}+\frac {9 i}{1024 d \left (a^8+i a^8 \tan (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 278, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3568, 46, 212}
\begin {gather*} -\frac {i}{1024 d \left (a^8-i a^8 \tan (c+d x)\right )}+\frac {9 i}{1024 d \left (a^8+i a^8 \tan (c+d x)\right )}+\frac {5 x}{512 a^8}+\frac {7 i}{768 a^5 d (a+i a \tan (c+d x))^3}+\frac {i}{128 d \left (a^4+i a^4 \tan (c+d x)\right )^2}+\frac {i}{64 a^3 d (a+i a \tan (c+d x))^5}+\frac {3 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^4}+\frac {i}{48 a^2 d (a+i a \tan (c+d x))^6}+\frac {i a}{36 d (a+i a \tan (c+d x))^9}+\frac {i}{32 d (a+i a \tan (c+d x))^8}+\frac {3 i}{112 a d (a+i a \tan (c+d x))^7} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 212
Rule 3568
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^8} \, dx &=-\frac {\left (i a^3\right ) \text {Subst}\left (\int \frac {1}{(a-x)^2 (a+x)^{10}} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^3\right ) \text {Subst}\left (\int \left (\frac {1}{1024 a^{10} (a-x)^2}+\frac {1}{4 a^2 (a+x)^{10}}+\frac {1}{4 a^3 (a+x)^9}+\frac {3}{16 a^4 (a+x)^8}+\frac {1}{8 a^5 (a+x)^7}+\frac {5}{64 a^6 (a+x)^6}+\frac {3}{64 a^7 (a+x)^5}+\frac {7}{256 a^8 (a+x)^4}+\frac {1}{64 a^9 (a+x)^3}+\frac {9}{1024 a^{10} (a+x)^2}+\frac {5}{512 a^{10} \left (a^2-x^2\right )}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac {i a}{36 d (a+i a \tan (c+d x))^9}+\frac {i}{32 d (a+i a \tan (c+d x))^8}+\frac {3 i}{112 a d (a+i a \tan (c+d x))^7}+\frac {i}{48 a^2 d (a+i a \tan (c+d x))^6}+\frac {i}{64 a^3 d (a+i a \tan (c+d x))^5}+\frac {7 i}{768 a^5 d (a+i a \tan (c+d x))^3}+\frac {3 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^4}+\frac {i}{128 d \left (a^4+i a^4 \tan (c+d x)\right )^2}-\frac {i}{1024 d \left (a^8-i a^8 \tan (c+d x)\right )}+\frac {9 i}{1024 d \left (a^8+i a^8 \tan (c+d x)\right )}-\frac {(5 i) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \tan (c+d x)\right )}{512 a^7 d}\\ &=\frac {5 x}{512 a^8}+\frac {i a}{36 d (a+i a \tan (c+d x))^9}+\frac {i}{32 d (a+i a \tan (c+d x))^8}+\frac {3 i}{112 a d (a+i a \tan (c+d x))^7}+\frac {i}{48 a^2 d (a+i a \tan (c+d x))^6}+\frac {i}{64 a^3 d (a+i a \tan (c+d x))^5}+\frac {7 i}{768 a^5 d (a+i a \tan (c+d x))^3}+\frac {3 i}{256 d \left (a^2+i a^2 \tan (c+d x)\right )^4}+\frac {i}{128 d \left (a^4+i a^4 \tan (c+d x)\right )^2}-\frac {i}{1024 d \left (a^8-i a^8 \tan (c+d x)\right )}+\frac {9 i}{1024 d \left (a^8+i a^8 \tan (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.28, size = 170, normalized size = 0.61 \begin {gather*} \frac {\sec ^8(c+d x) (15876 i+28224 i \cos (2 (c+d x))+20160 i \cos (4 (c+d x))+12960 i \cos (6 (c+d x))+315 i \cos (8 (c+d x))+5040 d x \cos (8 (c+d x))-224 i \cos (10 (c+d x))-7056 \sin (2 (c+d x))-10080 \sin (4 (c+d x))-9720 \sin (6 (c+d x))+315 \sin (8 (c+d x))+5040 i d x \sin (8 (c+d x))+280 \sin (10 (c+d x)))}{516096 a^8 d (-i+\tan (c+d x))^8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 169, normalized size = 0.61
method | result | size |
derivativedivides | \(\frac {-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{1024}+\frac {3 i}{256 \left (\tan \left (d x +c \right )-i\right )^{4}}+\frac {i}{32 \left (\tan \left (d x +c \right )-i\right )^{8}}-\frac {i}{48 \left (\tan \left (d x +c \right )-i\right )^{6}}-\frac {i}{128 \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {1}{36 \left (\tan \left (d x +c \right )-i\right )^{9}}-\frac {3}{112 \left (\tan \left (d x +c \right )-i\right )^{7}}+\frac {1}{64 \left (\tan \left (d x +c \right )-i\right )^{5}}-\frac {7}{768 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {9}{1024 \left (\tan \left (d x +c \right )-i\right )}+\frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{1024}+\frac {1}{1024 \tan \left (d x +c \right )+1024 i}}{d \,a^{8}}\) | \(169\) |
default | \(\frac {-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{1024}+\frac {3 i}{256 \left (\tan \left (d x +c \right )-i\right )^{4}}+\frac {i}{32 \left (\tan \left (d x +c \right )-i\right )^{8}}-\frac {i}{48 \left (\tan \left (d x +c \right )-i\right )^{6}}-\frac {i}{128 \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {1}{36 \left (\tan \left (d x +c \right )-i\right )^{9}}-\frac {3}{112 \left (\tan \left (d x +c \right )-i\right )^{7}}+\frac {1}{64 \left (\tan \left (d x +c \right )-i\right )^{5}}-\frac {7}{768 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {9}{1024 \left (\tan \left (d x +c \right )-i\right )}+\frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{1024}+\frac {1}{1024 \tan \left (d x +c \right )+1024 i}}{d \,a^{8}}\) | \(169\) |
risch | \(\frac {5 x}{512 a^{8}}+\frac {15 i {\mathrm e}^{-4 i \left (d x +c \right )}}{512 a^{8} d}+\frac {35 i {\mathrm e}^{-6 i \left (d x +c \right )}}{1024 a^{8} d}+\frac {63 i {\mathrm e}^{-8 i \left (d x +c \right )}}{2048 a^{8} d}+\frac {21 i {\mathrm e}^{-10 i \left (d x +c \right )}}{1024 a^{8} d}+\frac {5 i {\mathrm e}^{-12 i \left (d x +c \right )}}{512 a^{8} d}+\frac {45 i {\mathrm e}^{-14 i \left (d x +c \right )}}{14336 a^{8} d}+\frac {5 i {\mathrm e}^{-16 i \left (d x +c \right )}}{8192 a^{8} d}+\frac {i {\mathrm e}^{-18 i \left (d x +c \right )}}{18432 a^{8} d}+\frac {11 i \cos \left (2 d x +2 c \right )}{512 a^{8} d}+\frac {23 \sin \left (2 d x +2 c \right )}{1024 a^{8} d}\) | \(187\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 131, normalized size = 0.47 \begin {gather*} \frac {{\left (5040 \, d x e^{\left (18 i \, d x + 18 i \, c\right )} - 252 i \, e^{\left (20 i \, d x + 20 i \, c\right )} + 11340 i \, e^{\left (16 i \, d x + 16 i \, c\right )} + 15120 i \, e^{\left (14 i \, d x + 14 i \, c\right )} + 17640 i \, e^{\left (12 i \, d x + 12 i \, c\right )} + 15876 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 10584 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 5040 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 1620 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 315 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 28 i\right )} e^{\left (-18 i \, d x - 18 i \, c\right )}}{516096 \, a^{8} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.49, size = 394, normalized size = 1.42 \begin {gather*} \begin {cases} \frac {\left (- 2495687119199326634196634435584 i a^{72} d^{9} e^{92 i c} e^{2 i d x} + 112305920363969698538848549601280 i a^{72} d^{9} e^{88 i c} e^{- 2 i d x} + 149741227151959598051798066135040 i a^{72} d^{9} e^{86 i c} e^{- 4 i d x} + 174698098343952864393764410490880 i a^{72} d^{9} e^{84 i c} e^{- 6 i d x} + 157228288509557577954387969441792 i a^{72} d^{9} e^{82 i c} e^{- 8 i d x} + 104818859006371718636258646294528 i a^{72} d^{9} e^{80 i c} e^{- 10 i d x} + 49913742383986532683932688711680 i a^{72} d^{9} e^{78 i c} e^{- 12 i d x} + 16043702909138528362692649943040 i a^{72} d^{9} e^{76 i c} e^{- 14 i d x} + 3119608898999158292745793044480 i a^{72} d^{9} e^{74 i c} e^{- 16 i d x} + 277298568799925181577403826176 i a^{72} d^{9} e^{72 i c} e^{- 18 i d x}\right ) e^{- 90 i c}}{5111167220120220946834707324076032 a^{80} d^{10}} & \text {for}\: a^{80} d^{10} e^{90 i c} \neq 0 \\x \left (\frac {\left (e^{20 i c} + 10 e^{18 i c} + 45 e^{16 i c} + 120 e^{14 i c} + 210 e^{12 i c} + 252 e^{10 i c} + 210 e^{8 i c} + 120 e^{6 i c} + 45 e^{4 i c} + 10 e^{2 i c} + 1\right ) e^{- 18 i c}}{1024 a^{8}} - \frac {5}{512 a^{8}}\right ) & \text {otherwise} \end {cases} + \frac {5 x}{512 a^{8}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.28, size = 163, normalized size = 0.59 \begin {gather*} -\frac {-\frac {2520 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{8}} + \frac {2520 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a^{8}} + \frac {504 \, {\left (5 i \, \tan \left (d x + c\right ) - 6\right )}}{a^{8} {\left (\tan \left (d x + c\right ) + i\right )}} + \frac {-7129 i \, \tan \left (d x + c\right )^{9} - 68697 \, \tan \left (d x + c\right )^{8} + 296964 i \, \tan \left (d x + c\right )^{7} + 758772 \, \tan \left (d x + c\right )^{6} - 1271214 i \, \tan \left (d x + c\right )^{5} - 1465758 \, \tan \left (d x + c\right )^{4} + 1191540 i \, \tan \left (d x + c\right )^{3} + 693828 \, \tan \left (d x + c\right )^{2} - 295425 i \, \tan \left (d x + c\right ) - 89553}{a^{8} {\left (\tan \left (d x + c\right ) - i\right )}^{9}}}{516096 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.29, size = 235, normalized size = 0.85 \begin {gather*} \frac {5\,x}{512\,a^8}+\frac {\frac {163\,{\mathrm {tan}\left (c+d\,x\right )}^2}{448\,a^8}-\frac {10}{63\,a^8}-\frac {\mathrm {tan}\left (c+d\,x\right )\,9019{}\mathrm {i}}{32256\,a^8}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,393{}\mathrm {i}}{1792\,a^8}+\frac {11\,{\mathrm {tan}\left (c+d\,x\right )}^4}{64\,a^8}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^5\,1{}\mathrm {i}}{2\,a^8}-\frac {95\,{\mathrm {tan}\left (c+d\,x\right )}^6}{192\,a^8}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^7\,205{}\mathrm {i}}{768\,a^8}+\frac {5\,{\mathrm {tan}\left (c+d\,x\right )}^8}{64\,a^8}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^9\,5{}\mathrm {i}}{512\,a^8}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^{10}\,1{}\mathrm {i}+8\,{\mathrm {tan}\left (c+d\,x\right )}^9-{\mathrm {tan}\left (c+d\,x\right )}^8\,27{}\mathrm {i}-48\,{\mathrm {tan}\left (c+d\,x\right )}^7+{\mathrm {tan}\left (c+d\,x\right )}^6\,42{}\mathrm {i}+{\mathrm {tan}\left (c+d\,x\right )}^4\,42{}\mathrm {i}+48\,{\mathrm {tan}\left (c+d\,x\right )}^3-{\mathrm {tan}\left (c+d\,x\right )}^2\,27{}\mathrm {i}-8\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________